<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
    <HEAD>
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
        <TITLE>ARCo on Oracle 10g</TITLE>
        <META NAME="GENERATOR" CONTENT="StarOffice 6.0  (Solaris Sparc)">
        <META NAME="CREATED" CONTENT="20030826;9373600">
        <META NAME="CHANGED" CONTENT="20030826;9401300">
    </HEAD>
    <BODY LANG="en-US">
        <H2>ARCO and Oracle 10g</H2>
        <H3><FONT COLOR="#336699">ARCo & Oracle jdbc drivers</FONT></H3>
        <p>ARCo supports Oracle Database 10g, however there is a known problem with the jdbc drivers 
            of Oracle Database 10 Release 2 (also known as Oracle 10.2). The authors of the jdbc drivers 
            added an optional sealed option to the manifest file of the driver's jar file. Package sealing 
            is important for security, because it restricts access to package-protected members to only those 
            classes defined in the package that originated from the same JAR file. ARCo module is a web-based 
            tool deployed on the Sun Web Console, which use it's class loader to load the class from the jdbc 
            driver jar file, and due to this security protection there is thrown this exception:<br />
            <p style="font-size: 85%; padding-left: 50px;">
                Sealing violation loading oracle.jdbc.pool.OracleDataSource : Package oracle.jdbc.pool is sealed. <br />
                (java.lang.SecurityException) <br />
                at <br />
                org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1632)<br />
                org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:937)<br />
                org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1372)<br />
                org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)<br />
                java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<br />
                java.lang.ClassLoader.defineClass1(Native Method)<br />
                java.lang.ClassLoader.defineClass(ClassLoader.java:620)<br />
                java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)<br />
                org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1643)<br />
                org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:937)<br />
                org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1372)<br />
                org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)<br />
                java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<br />
                com.sun.grid.arco.sql.OracleSQLGenerator.createDatasource(OracleSQLGenerator.java:47)<br />
                com.sun.grid.arco.sql.ArcoDbConnectionPool.init(ArcoDbConnectionPool.java:125)<br />
                com.sun.grid.arco.sql.ArcoDbConnectionPool.getConnection(ArcoDbConnectionPool.java:164)<br />
                com.sun.grid.arco.sql.ArcoDbConnectionPool.getViewList(ArcoDbConnectionPool.java:211)<br />
                com.sun.grid.arco.web.arcomodule.query.SimplePropertySheetModel.createChild(SimplePropertySheetModel.java:89)<br />
                com.sun.grid.arco.web.arcomodule.query.SimpleTab.createChild(SimpleTab.java:89)<br />
                com.iplanet.jato.view.ContainerViewBase.ensureChild(ContainerViewBase.java:187)
            </p>
            Please refer to <a href="http://java.sun.com/javase/6/docs/technotes/guides/extensions/spec.html#sealing" 
                                target="_blank">http://java.sun.com/javase/6/docs/technotes/guides/extensions/spec.html#sealing</a>
            for more information about sealed option of the jar files.
        </p>
        <H3><FONT COLOR="#336699">Solution</FONT></H3>
        <p>To avoid this problem we can offer these possibilities so far:
            <ul>
            <li><b>Use the the jdbc driver of previous versions of Oracle (10.1, or 9.2 versions can be used)</b></li>
            <p>Please download the appropriate driver from 
                <a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html" 
               target="_blank">http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html</a></p>
            <li><b>Rewrite the MANIFEST file of the jdbc Oracle 10.2. jar file</b></li>
            <ul>
            <li>Extract the content of the jar file to the selected directory: <b><i>jar xvf ojdbc14.jar</i></b></li>
            <li>Update the content of the MANIFEST file in your editor</li>
            <p>The original content of the MANIFEST file of ojdbc14.jar file looks like:</p>
            <p style="font-size: 85%; padding-left: 50px;">
                Manifest-Version: 1.0<br />
                Specification-Title:    Oracle JDBC driver classes for use with JDK14<br />
                Sealed: true<br />
                Created-By: 1.4.2_08 (Sun Microsystems Inc.)<br />
                Implementation-Title:   ojdbc14.jar<br />
                Specification-Vendor:   Oracle Corporation<br />
                Specification-Version:  Oracle JDBC Driver version - "10.2.0.1.0"<br />
                Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"<br />
                Implementation-Vendor:  Oracle Corporation<br />
                Implementation-Time:    Wed Jun 22 18:55:48 2005<br />
                <br />
                Name: oracle/sql/converter/<br />
                Sealed: false<br />
                <br />
                Name: oracle/sql/<br />
                Sealed: false<br />
                <br />
                Name: oracle/sql/converter_xcharset/<br />
                Sealed: false<br />
            </p>
            <p>To run ARCo with this driver you should remove the sealed option from the MANIFEST file, so the result looks like:</p>
            <p style="font-size: 85%; padding-left: 50px;">
                Manifest-Version: 1.0<br />
                Specification-Title:    Oracle JDBC driver classes for use with JDK14<br />
                Created-By: 1.4.2_08 (Sun Microsystems Inc.)<br />
                Implementation-Title:   ojdbc14.jar<br />
                Specification-Vendor:   Oracle Corporation<br />
                Specification-Version:  Oracle JDBC Driver version - "10.2.0.1.0"<br />
                Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"<br />
                Implementation-Vendor:  Oracle Corporation<br />
                Implementation-Time:    Wed Jun 22 18:55:48 2005<br />
                <br />
            </p>
            <li>Create the jar file with the updated manifest file: <b><i>jar cfm ojdbc14.jar META-INF/MANIFEST.MF  oracle/</i></b></li>
            <li>Use the modified jdbc driver</li>
        </p>
        </ul>
        </p>
    </BODY>
</HTML>
